From: Antoine Musso Date: Mon, 27 Jun 2005 02:18:45 +0000 (+0000) Subject: Fix #bug 2460: width & height now properly filled when resizing image X-Git-Tag: 1.5.0beta2~186 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmembres/Subpage_test/1/2/%5B%27/%40%20%27icone_supprimer_signature%27%20=%3E%20%27Delete%20this%20signature%27%2C%20%27icone_valider_signature%27%20=%3E%20%27Validate%20this%20signature%27%2C%20%27image_administrer_rubrique%27%20=%3E%20%27You%20can%20manage%20this%20section%27%2C-%27impossible_modifier_login_auteur%27%20=%3E%20%27Login%20cannot%20be%20changed.%27%2C-%27impossible_modifier_pass_auteur%27%20=%3E%20%27Password%20cannot%20be%20changed.%27%2C%20%27info_1_article%27%20=%3E%20%271%20article%27%2C-%27info_1_article_syndique%27%20=%3E%20%271%20syndicated%20article%27%2C%20%27info_1_auteur%27%20=%3E%20%271%20author%27%2C%20%27info_1_message%27%20=%3E%20%271%20message%27%2C%20%27info_1_mot_cle%27%20=%3E%20%271%20keyword%27%2C%20%27info_1_rubrique%27%20=%3E%20%271%20section%27%2C-%27info_1_site%27%20=%3E%20%271%20site%27%2C%20%27info_1_visiteur%27%20=%3E%20%271%20visitor%27%2C%20%27info_activer_cookie%27%20=%3E%20%27You%20can%20activate%20an%20%3Cb%3Eadministration%20cookie%3C/b%3E%2C%20which%20allows%20you%20%20to%20switch%20easily%20between%20the%20public%20site%20and%20the%20private%20area.%27%2C%40%40%20-249%2C16%20%20213%2C13%20%40%40%20Do%20not%20submit%20this%20import%20request.%3Cp%3EFor%20more%20information%2C%20please%20see%20%3Ca%20href=?a=commitdiff_plain;h=6f6d8b74b27c8d98e9f42d48185826e69a72e25c;p=lhc%2Fweb%2Fwiklou.git Fix #bug 2460: width & height now properly filled when resizing image --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 760f396ed7..3c23173a0c 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -376,6 +376,7 @@ Various bugfixes, small features, and a few experimental things: * (bug 1242) category list now show on edit page * Skip sidebar entries where link text is '-' * Convert non-UTF-8 URL parameters even if referer is local +* (bug 2460) width & height properly filled when resizing image === Caveats === diff --git a/includes/Linker.php b/includes/Linker.php index ed7c6c9cfd..fbecbd9f9d 100644 --- a/includes/Linker.php +++ b/includes/Linker.php @@ -419,7 +419,9 @@ class Linker { $width = $img->getWidth() * $height / $img->getHeight(); } if ( '' == $manual_thumb ) { - $url = $img->createThumb( $width ); + $thumb = $img->getThumbnail( $width ); + $height = $thumb->height; + $url = $thumb->getUrl( ); } } @@ -429,7 +431,9 @@ class Linker { //$s .= "
{$alt}
{$url}
\n"; } else { $s = '' . - ''.$alt.''; + ''.$alt.''; } if ( '' != $align ) { $s = "
{$s}
";